package com.taptech.doufu.ui.fragment.weex;

import android.os.Bundle;

import com.taptech.doufu.ui.activity.MainHomeActivity;
import com.taptech.doufu.weex.notification.QLXNotificationCenter;
import com.taptech.doufu.weex.notification.QLXNotificationListener;

import java.util.HashMap;

/**
 * Created by Administrator on 2017/5/18/018.
 */

public class PersonalCenterFragment extends TFWXFragment {


    @Override
    public void onCreate(Bundle savedInstanceState) {
        HashMap param = new HashMap();
        param.put("url","PersonalCenter/TFPersonalCenter.js");
        super.param = param;
        super.showStatusLayout = true;
        super.onCreate(savedInstanceState);
        QLXNotificationCenter.getInstance().addNotify("TFPersonCenterPageDidSelect", this, new QLXNotificationListener() {
            @Override
            public void notify(String event, Object data) {
                QLXNotificationCenter.getInstance().postNotify("pc_viewdidappear",null);
            }
        });
    }

    @Override
    public void onResume() {
        super.onResume();
        if(MainHomeActivity.mainInstance.currentTabIndex == 4){
            QLXNotificationCenter.getInstance().postNotify("pc_viewdidappear",null);
        }
    }

}
